<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Russian Dolls for the Maximum Stable Set Problem: rdmaxclique.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Russian Dolls for the Maximum Stable Set Problem
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">rdmaxclique.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Russian doll algorithm for maximum clique.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;<a class="el" href="bitmap_8h_source.html">bitmap.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="graph_8h_source.html">graph.h</a>&gt;</code><br/>
<code>#include &lt;stdlib.h&gt;</code><br/>
<code>#include &lt;stdio.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &lt;sys/time.h&gt;</code><br/>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structDoll.html">Doll</a></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ad7ec08491139209b12ec0f3b7fce19bc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structGraph.html">Graph</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rdmaxclique_8c.html#ad7ec08491139209b12ec0f3b7fce19bc">readDimacsGraph</a> (FILE *graphFile)</td></tr>
<tr class="memdesc:ad7ec08491139209b12ec0f3b7fce19bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads a graph from a specified file in the DIMACS format.  <a href="#ad7ec08491139209b12ec0f3b7fce19bc"></a><br/></td></tr>
<tr class="memitem:af540c831cb20234d08060437a1c6b42e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rdmaxclique_8c.html#af540c831cb20234d08060437a1c6b42e">fracColoring</a> (<a class="el" href="bitmap_8h.html#a5047cbfad0b49c9f1c7a57ddbee2009a">NODETYPE</a> *R, <a class="el" href="bitmap_8h.html#a5047cbfad0b49c9f1c7a57ddbee2009a">NODETYPE</a> *W, int lim, int *minRNode, int *maxRNode, int *minWNode, int *maxWNode)</td></tr>
<tr class="memdesc:af540c831cb20234d08060437a1c6b42e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Greedy heuristic for fractional coloring.  <a href="#af540c831cb20234d08060437a1c6b42e"></a><br/></td></tr>
<tr class="memitem:abc80029c59e3d92b7a52a69d7d92f19e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rdmaxclique_8c.html#abc80029c59e3d92b7a52a69d7d92f19e">mcsColoring</a> (<a class="el" href="bitmap_8h.html#a5047cbfad0b49c9f1c7a57ddbee2009a">NODETYPE</a> *R, <a class="el" href="bitmap_8h.html#a5047cbfad0b49c9f1c7a57ddbee2009a">NODETYPE</a> *W, int lim, int *minRNode, int *maxRNode, int *minWNode, int *maxWNode)</td></tr>
<tr class="memdesc:abc80029c59e3d92b7a52a69d7d92f19e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Greedy heuristic for vertex coloring, with vertex recoloring.  <a href="#abc80029c59e3d92b7a52a69d7d92f19e"></a><br/></td></tr>
<tr class="memitem:a2027ae43019c70da346336742fad13ce"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rdmaxclique_8c.html#a2027ae43019c70da346336742fad13ce">greedyColoring</a> (<a class="el" href="bitmap_8h.html#a5047cbfad0b49c9f1c7a57ddbee2009a">NODETYPE</a> *R, <a class="el" href="bitmap_8h.html#a5047cbfad0b49c9f1c7a57ddbee2009a">NODETYPE</a> *W, int lim, int *minRNode, int *maxRNode, int *minWNode, int *maxWNode)</td></tr>
<tr class="memdesc:a2027ae43019c70da346336742fad13ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Greedy heuristic for vertex coloring.  <a href="#a2027ae43019c70da346336742fad13ce"></a><br/></td></tr>
<tr class="memitem:ad15d65b6c9eeb3f4cf17e76beb92e4bd"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rdmaxclique_8c.html#ad15d65b6c9eeb3f4cf17e76beb92e4bd">mcr</a> (<a class="el" href="structGraph.html">Graph</a> *g, int *res)</td></tr>
<tr class="memdesc:ad15d65b6c9eeb3f4cf17e76beb92e4bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Colors input array of vertices according to saturation degree.  <a href="#ad15d65b6c9eeb3f4cf17e76beb92e4bd"></a><br/></td></tr>
<tr class="memitem:a887ee4f9bcc84f0fcd822444153ae52e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rdmaxclique_8c.html#a887ee4f9bcc84f0fcd822444153ae52e">rd_maxClique</a> (<a class="el" href="structGraph.html">Graph</a> *gg, size_t *ndolls, size_t *memsz)</td></tr>
<tr class="memitem:a0ddf1224851353fc92bfbff6f499fa97"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="rdmaxclique_8c.html#a0ddf1224851353fc92bfbff6f499fa97">main</a> (int argc, char *argv[])</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Russian doll algorithm for maximum clique. </p>
<dl class="section date"><dt>Date:</dt><dd>Sep 24, 2013 </dd></dl>
<dl class="section author"><dt>Author:</dt><dd>Ricardo C. Corrêa (<a href="#" onclick="location.href='mai'+'lto:'+'cor'+'re'+'a@l'+'ia'+'.uf'+'c.'+'br'; return false;">corre<span style="display: none;">.nosp@m.</span>a@li<span style="display: none;">.nosp@m.</span>a.ufc<span style="display: none;">.nosp@m.</span>.br</a>) </dd></dl>
</div><hr/><h2>Function Documentation</h2>
<a class="anchor" id="af540c831cb20234d08060437a1c6b42e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int fracColoring </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="bitmap_8h.html#a5047cbfad0b49c9f1c7a57ddbee2009a">NODETYPE</a> *&#160;</td>
          <td class="paramname"><em>R</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="bitmap_8h.html#a5047cbfad0b49c9f1c7a57ddbee2009a">NODETYPE</a> *&#160;</td>
          <td class="paramname"><em>W</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>lim</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>minRNode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>maxRNode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>minWNode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>maxWNode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Greedy heuristic for fractional coloring. </p>
<p>The vertices in the specified bitmap are colored, removed from this bitmap, and stored in another specified bitmap. A maximum number of colors is specified. Vertices that cannot be colored with this number of colors remains in the input bitmap.</p>
<p>The smallest and greatest indices of non-zero nodes of the specified bitmaps are updated.</p>
<p>If <code>R</code>[<code>*minRNode<code></code>]</code> <code>==</code> <code>0</code>, then an error may occur.</p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">R</td><td>Input bitmap of vertices to color. </td></tr>
    <tr><td class="paramname">W</td><td>Output bitmap to store vertices as soon as they are colored. </td></tr>
    <tr><td class="paramname">lim</td><td>Maximum number of colors that can be used. </td></tr>
    <tr><td class="paramname">minRNode</td><td>Smallest index of a non-zero node of the input bitmap. </td></tr>
    <tr><td class="paramname">maxRNode</td><td>Greates index of a non-zero node of the input bitmap. </td></tr>
    <tr><td class="paramname">minWNode</td><td>Smallest index of a non-zero node of the output bitmap. </td></tr>
    <tr><td class="paramname">maxWNode</td><td>Greates index of a non-zero node of the output bitmap.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The number of colors used. </dd></dl>

</div>
</div>
<a class="anchor" id="a2027ae43019c70da346336742fad13ce"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int greedyColoring </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="bitmap_8h.html#a5047cbfad0b49c9f1c7a57ddbee2009a">NODETYPE</a> *&#160;</td>
          <td class="paramname"><em>R</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="bitmap_8h.html#a5047cbfad0b49c9f1c7a57ddbee2009a">NODETYPE</a> *&#160;</td>
          <td class="paramname"><em>W</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>lim</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>minRNode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>maxRNode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>minWNode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>maxWNode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Greedy heuristic for vertex coloring. </p>
<p>The vertices in the specified bitmap are colored, removed from this bitmap, and stored in another specified bitmap. A maximum number of colors is specified. Vertices that cannot be colored with this number of colors remains in the input bitmap.</p>
<p>The smallest and greatest indices of non-zero nodes of the specified bitmaps are updated.</p>
<p>If <code>R</code>[<code>*minRNode<code></code>]</code> <code>==</code> <code>0</code>, then an error may occur.</p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">R</td><td>Input bitmap of vertices to color. </td></tr>
    <tr><td class="paramname">W</td><td>Output bitmap to store vertices as soon as they are colored. </td></tr>
    <tr><td class="paramname">lim</td><td>Maximum number of colors that can be used. </td></tr>
    <tr><td class="paramname">minRNode</td><td>Smallest index of a non-zero node of the input bitmap. </td></tr>
    <tr><td class="paramname">maxRNode</td><td>Greates index of a non-zero node of the input bitmap. </td></tr>
    <tr><td class="paramname">minWNode</td><td>Smallest index of a non-zero node of the output bitmap. </td></tr>
    <tr><td class="paramname">maxWNode</td><td>Greates index of a non-zero node of the output bitmap.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The number of colors used. </dd></dl>

</div>
</div>
<a class="anchor" id="a0ddf1224851353fc92bfbff6f499fa97"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>argv</em>[]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ad15d65b6c9eeb3f4cf17e76beb92e4bd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mcr </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structGraph.html">Graph</a> *&#160;</td>
          <td class="paramname"><em>g</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>res</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Colors input array of vertices according to saturation degree. </p>
<p>The specific coloring property: if <img class="formulaInl" alt="$ c $" src="form_0.png"/> is the color assigned to a vertex <img class="formulaInl" alt="$ v $" src="form_1.png"/> and <img class="formulaInl" alt="$ \langle v_1, v_2, \ldots, v_i \rangle $" src="form_2.png"/> are the vertices getting color smaller than <img class="formulaInl" alt="$ c $" src="form_0.png"/>, then <img class="formulaInl" alt="$ v $" src="form_1.png"/> is the vertex in the subgraph induced by <img class="formulaInl" alt="$ V' = \{ v_1, v_2, \ldots, v_i, v \} $" src="form_3.png"/> with the following properties:</p>
<ol type="1">
<li><img class="formulaInl" alt="$ deg(v) \geq deg(v_j) $" src="form_4.png"/>, for all <img class="formulaInl" alt="$ 1 \leq j \leq i $" src="form_5.png"/>;</li>
<li>if <img class="formulaInl" alt="$deg(v) = deg(v_j)$" src="form_6.png"/>, then <img class="formulaInl" alt="$ex-deg(v_j) \leq ex-deg(v)$" src="form_7.png"/>, where <img class="formulaInl" alt="$ex-deg(u) = \sum_{w \in N(u) \cap V'} deg(w)$" src="form_8.png"/>.</li>
</ol>
<p>This function builds a sequence <img class="formulaInl" alt="$ \langle v_1, v_2, \ldots, v_r \rangle $" src="form_9.png"/> of the vertices satisfying the conditions above "from right-to-left": the first vertex to be determined is <img class="formulaInl" alt="$v_r$" src="form_10.png"/>, then <img class="formulaInl" alt="$v_{r-1}$" src="form_11.png"/>, and so on.</p>
<p>It employs a triple-level priority list described next.</p>
<p>A subset of elements <code>0</code>, <code>1</code>, <code></code>..., <code>n</code> <code>-</code> <code>1</code>, for a fixed positive integer <code>n</code>, is stored according to two levels of priorities. A composition of lists is used in order to perform certain specific operations in (almost) constant time. A general description:</p>
<div class="image">
<img src="triplelist.jpg" alt="triplelist.jpg"/>
<div class="caption">
Three levels</div></div>
<p> Levels 1 and 2 implement the two levels of priorities. The elements are stored in the lists of level 3.</p>
<p>Nodes in level 1 are sorted by the application, which is usually done according <code>key1</code>.</p>
<p>Nodes in level 2 are sorted in a decreasing order of <code>key2</code>.</p>
<p>The lists of levels 1 and 2 are implemented with arrays of fixed size. A list of free nodes is maintained. These three lists share the same nodes, which means that each of such a node is always in one out of three possible states: in the list of level 1, in the list of level 2, or in the list of free nodes.</p>
<p>Nodes in level 3 are in an arbitrary order. Two nodes is a same list of level 3 have same <code>key2</code>. The value of each node in level 3 is its index in an array of fixed size. For this reason, there is no need for a list of free nodes.</p>
<p>Since levels 1 and 2 share their nodes, the following arrays are identified: </p>
<pre class="fragment">    prev2 = prev1;
    node1 = key1;
    first3 = next1;
</pre><p>From TripleList:</p>
<ul>
<li>key1 structural degree of specified vertices in the subgraph induced by them, sorting in descending order</li>
<li>key2 ex-deg of specified vertices in the subgraph induced by them</li>
</ul>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">g</td><td>The input graph. </td></tr>
    <tr><td class="paramname">res</td><td>New ordering of the vertices.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The number of vertices in the input graph. </dd></dl>
<p>Removes a specified node from the list of free nodes</p>
<p>The specified node is removed from the using the entry associated with it in the arrays next1 and prev1. freehead is updated if necessary.</p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">j</td><td>the index of the node to be removed</td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="abc80029c59e3d92b7a52a69d7d92f19e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int mcsColoring </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="bitmap_8h.html#a5047cbfad0b49c9f1c7a57ddbee2009a">NODETYPE</a> *&#160;</td>
          <td class="paramname"><em>R</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="bitmap_8h.html#a5047cbfad0b49c9f1c7a57ddbee2009a">NODETYPE</a> *&#160;</td>
          <td class="paramname"><em>W</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>lim</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>minRNode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>maxRNode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>minWNode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>maxWNode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Greedy heuristic for vertex coloring, with vertex recoloring. </p>
<p>The vertices in the specified bitmap are colored, removed from this bitmap, and stored in another specified bitmap. A maximum number of colors is specified. Vertices that cannot be colored with this number of colors remains in the input bitmap.</p>
<p>The smallest and greatest indices of non-zero nodes of the specified bitmaps are updated.</p>
<p>If <code>R</code>[<code>*minRNode<code></code>]</code> <code>==</code> <code>0</code>, then an error may occur.</p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">R</td><td>Input bitmap of vertices to color. </td></tr>
    <tr><td class="paramname">W</td><td>Output bitmap to store vertices as soon as they are colored. </td></tr>
    <tr><td class="paramname">lim</td><td>Maximum number of colors that can be used. </td></tr>
    <tr><td class="paramname">minRNode</td><td>Smallest index of a non-zero node of the input bitmap. </td></tr>
    <tr><td class="paramname">maxRNode</td><td>Greates index of a non-zero node of the input bitmap. </td></tr>
    <tr><td class="paramname">minWNode</td><td>Smallest index of a non-zero node of the output bitmap. </td></tr>
    <tr><td class="paramname">maxWNode</td><td>Greates index of a non-zero node of the output bitmap.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The number of colors used. </dd></dl>

</div>
</div>
<a class="anchor" id="a887ee4f9bcc84f0fcd822444153ae52e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rd_maxClique </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structGraph.html">Graph</a> *&#160;</td>
          <td class="paramname"><em>gg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>ndolls</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>memsz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>&lt; Current clique </p>

</div>
</div>
<a class="anchor" id="ad7ec08491139209b12ec0f3b7fce19bc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structGraph.html">Graph</a>* readDimacsGraph </td>
          <td>(</td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>graphFile</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads a graph from a specified file in the DIMACS format. </p>
<p>A new graph is created.</p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">graphFile</td><td>The input file in the DIMACS format.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>The graph read from the specified file. </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Oct 4 2013 18:05:35 for Russian Dolls for the Maximum Stable Set Problem by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.1
</small></address>
</body>
</html>
